/**
 * Basic data generation script (PostgreSQL 8.x).
 * @author Clement HELIOU (clement.heliou@che-software.com).
 * @copyright Che Software.
 * @license GNU General Public License.
 * @since August, 2011.
 *
 *  This file is part of Testato.
 *
 *  Testato is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Testato is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Testato.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Testato's logo is a creation of Arrioch (http://arrioch.deviantart.com/)
 *  and it's distributed under the terms of the Creative Commons License.
 */

BEGIN;

-- Assignment status.
INSERT INTO assignment_status(assignment_status) VALUES ('ASSIGNED');
INSERT INTO assignment_status(assignment_status) VALUES ('ENDED');
INSERT INTO assignment_status(assignment_status) VALUES ('NOT_ASSIGNED');

-- Criterion types.
INSERT INTO criterion_type(criterion_type) VALUES('COST');
INSERT INTO criterion_type(criterion_type) VALUES('FIT');
INSERT INTO criterion_type(criterion_type) VALUES('RISK');
INSERT INTO criterion_type(criterion_type) VALUES('VALUE');

-- Selection types.
INSERT INTO selection_type(selection_type) VALUES('DRASTIC');
INSERT INTO selection_type(selection_type) VALUES('ELITIST');
INSERT INTO selection_type(selection_type) VALUES('FLEXIBLE');
INSERT INTO selection_type(selection_type) VALUES('SAFE');
INSERT INTO selection_type(selection_type) VALUES('TOTAL');

-- Operators.
INSERT INTO operator(operator) VALUES('AND');
INSERT INTO operator(operator) VALUES('OR');

-- Selection types and operator mapping.
INSERT INTO selection_type_operator(operator, selection_type) VALUES('AND','DRASTIC');
INSERT INTO selection_type_operator(operator, selection_type) VALUES('AND','ELITIST');
INSERT INTO selection_type_operator(operator, selection_type) VALUES('OR','FLEXIBLE');
INSERT INTO selection_type_operator(operator, selection_type) VALUES('OR','SAFE');
INSERT INTO selection_type_operator(operator, selection_type) VALUES('OR','TOTAL');

-- Selectives areas.
INSERT INTO selective_area(selective_area) VALUES('HIGH');
INSERT INTO selective_area(selective_area) VALUES('LOW');
INSERT INTO selective_area(selective_area) VALUES('MEDIUM');

-- Selection types and selectives areas mapping (cost/value part).
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('DRASTIC','HIGH'); 
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('ELITIST','HIGH');
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('ELITIST','MEDIUM');
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('FLEXIBLE','HIGH'); 
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('SAFE','HIGH');
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('SAFE','MEDIUM');
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('TOTAL','HIGH'); 
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('TOTAL','MEDIUM');
INSERT INTO cv_selection_type_area(selection_type, selective_area) VALUES('TOTAL','LOW');

-- Selection types and selectives areas mapping (fit/risk part).
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('DRASTIC','HIGH');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('ELITIST','HIGH');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('ELITIST','MEDIUM');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('FLEXIBLE','HIGH');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('SAFE','HIGH');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('SAFE','MEDIUM');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('TOTAL','HIGH');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('TOTAL','MEDIUM');
INSERT INTO fr_selection_type_area(selection_type, selective_area) VALUES('TOTAL','LOW');

-- Point types.
INSERT INTO point_type(point_type) VALUES('CHOICE');
INSERT INTO point_type(point_type) VALUES('JOIN');
INSERT INTO point_type(point_type) VALUES('NEGATIVE_END');
INSERT INTO point_type(point_type) VALUES('POSITIVE_END');
INSERT INTO point_type(point_type) VALUES('START');

-- Variant types.
INSERT INTO variant_type(variant_type) VALUES('FAILURE');
INSERT INTO variant_type(variant_type) VALUES('SUCCESS');

-- User roles.
INSERT INTO "role"("role") VALUES('ROLE_ADMIN');
INSERT INTO "role"("role") VALUES('ROLE_RESP');
INSERT INTO "role"("role") VALUES('ROLE_USER');

-- AHP random index.
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 1, 0);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 2, 0);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 3, 0.58);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 4, 0.9);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 5, 1.12);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 6, 1.24);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 7, 1.32);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 8, 1.41);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 9, 1.45);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 10, 1.49);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 11, 1.51);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 12, 1.48);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 13, 1.56);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 14, 1.57);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 15, 1.59);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 16, 1.61);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 17, 1.63);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 18, 1.65);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 19, 1.67);
INSERT INTO random_index(random_index_id, number, value) VALUES(nextval('random_index_seq'), 20, 1.69);

COMMIT;